#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
const int N = 2e5 + 100;

int n, a[N];

bool cmp(int x, int y)
{
    return x > y;
}

void solve()
{
    ll n;
    cin >> n;
    vector<ll> a(n);
    bool flag = 0;

    for (ll i = 0; i < n; i++)
    {
        cin >> a[i];
        if (a[i] % 2 == 1)
            flag = 1;
    }
    if (!flag)
    {
        cout << 0 << "\n";
        return;
    }
    sort(a.begin(), a.end(), cmp);
    ll ans = 0;
    vector<ll> b;
    flag = 0;
    for (ll i = 0; i < n; i++)
    {
        if (a[i] % 2 == 1 && flag == 0)
        {
            flag = 1;
            ans += a[i];
        }
        else if (a[i] % 2 == 1 && flag == 1)
        {
            b.push_back(a[i]);
        }
        else
        {
            ans += a[i];
        }
    }
    sort(b.begin(), b.end(),cmp);
    for (ll i = 0; i < floor(b.size() / 2.0); i++)
    {
        ans += b[i];
    }
    cout << ans << endl;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    int _ = 1;
    cin >> _;
    while (_--)
        solve();
    return 0;
}
